<include file="public@header" />
<style>
th{
	font-size:14px;
}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Rock/product')}">石材产品库</a></li>
			<li><a href="{:url('Rock/producttypeadd')}">新增石材产品</a></li>
		</ul>
        <div>
       	<form  class="well form-search" action="{:url('Rock/product')}" method="get">
        <label>产品名称:
        	<input type="text" name="pro_name" class="form-control" placeholder="请输入产品名称" value="{$pro_name}" >
        </label>
		<label>类型:
			<select class="form-control" name="pro_type">
				<option value="">——请选择——</option>
				<volist name="$typeArr" id="vo">
					<if condition="$pro_type eq $vo.id">
						<option value="{$vo.id}" selected>{$vo.name}</option>
						<else/>
						<option value="{$vo.id}">{$vo.name}</option>
					</if>
				</volist>
			</select>
		</label>
		<label>碑型:
			<select class="form-control" name="stele_type">
				<option value="">——请选择——</option>
				<volist name="$beiArr" id="vo">
					<if condition="$stele_type eq $vo.id">
						<option value="{$vo.id}" selected>{$vo.name}</option>
						<else/>
						<option value="{$vo.id}">{$vo.name}</option>
					</if>
				</volist>
			</select>
		</label>
		<label>墓穴规制:
			<select class="form-control" name="regulation">
				<option value="">——请选择——</option>
				<volist name="$regulationArr" id="vo">
					<if condition="$regulation eq $vo.id">
						<option value="{$vo.id}" selected>{$vo.name}</option>
						<else/>
						<option value="{$vo.id}">{$vo.name}</option>
					</if>
				</volist>
			</select>
		</label>
		<label>规格:
			<input type="text" name="length" class="form-control" placeholder="请输入规格" value="{$length}" >
		</label>
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Rock/product')}">清空</a>
        </form>
        </div>
		<form action="{:url('Rbac/listorders')}" method="post">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                        <th width="3%">ID</th>
						<th width="10%">产品编号</th>
						<th width="8%">类型</th>
                        <th width="10%">产品名称/方案编号</th>
                        <th width="8%">碑型</th>
                        <th width="8%">墓穴规制</th>
						<th width="15%">占地规格</th>
						<th width="10%">墓碑总高</th>
						<th width="12%">创建时间</th>
						<th width="6%">状态</th>
						<th width="15%">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="results" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.pro_code}</td>
						<td>
							<if condition="$vo.pro_type eq 1">
								商品墓
							<elseif condition="$vo.pro_type eq 2"/>
								艺术墓（定制）
							<elseif condition="$vo.pro_type eq 3"/>
								生态墓
							<else/>
								节地墓
							</if>
						</td>
						<td>{$vo.pro_name}</td>
						<td>
							<if condition="$vo.stele_type eq 1">
								立碑
								<elseif condition="$vo.stele_type eq 2"/>
								卧碑
								<elseif condition="$vo.stele_type eq 3"/>
								纪念墙
								<elseif condition="$vo.stele_type eq 4"/>
								纪念铭牌
								<else/>
								格位
							</if>
						</td>
						<td>
							<if condition="$vo.regulation eq 1">
								单穴
								<elseif condition="$vo.regulation eq 2"/>
								双穴
								<else/>
								三穴
							</if>
						</td>
                        <td>{$vo.pro_length}mm*{$vo.pro_width}mm</td>
                        <td>{$vo.pro_height}</td>
						<td>{$vo.add_time|date='Y-m-d H:i:s'}</td>
						<td>
							<if condition="$vo.pro_status eq 1">
								<a class="js-ajax-delete" data-msg="确定更改状态吗？"
								   href="{:url('Rock/producttoggle',array('id'=>$vo['id'],'pro_status'=>1))}">启用</a>
								<else/>
								<a class="js-ajax-delete" data-msg="确定更改状态吗？"
								   href="{:url('Rock/producttoggle',array('id'=>$vo['id'],'pro_status'=>2))}">停用</a>
							</if>
						</td>
						<td>
							<if condition="$vo.pro_type eq 1">
								<a href="{:url('Rock/productspedit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
							<elseif condition="$vo.pro_type eq 2"/>
								<a href="{:url('Rock/productysedit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
							<elseif condition="$vo.pro_type eq 3"/>
								<a href="{:url('Rock/productstedit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
							<else/>
								<a href="{:url('Rock/productjdedit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
							</if>
                            |
							<a href="{:url('Rock/productdel',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                        </td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>

	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
</body>
</html>
